//
//  HXProductCell.m
//  爱鲜蜂
//
//  Created by 建国 on 16/4/18.
//  Copyright © 2016年 建国. All rights reserved.
//

#import "HXProductCell.h"
#import <UIImageView+WebCache.h>
@interface HXProductCell ()
//商品名称
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
//价格
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;

//图片
@property (weak, nonatomic) IBOutlet UIImageView *image;

//规格
@property (weak, nonatomic) IBOutlet UILabel *specifics;

@end

@implementation HXProductCell

-(void)setProducts:(HXProducts *)products{

    _products = products;
    _nameLabel.text = products.name;
    _priceLabel.text = [NSString stringWithFormat:@"%.2f",products.d_price];
//    NSLog(@"%@",products.img);
    
    NSURL *url = [NSURL URLWithString:products.img];
    [_image sd_setImageWithURL:url];
    _specifics.text = products.specifics;
    
}


- (void)awakeFromNib {

}


@end
